package com.gexin.common;

import com.gexin.common.cache.CacheUtils;
import com.gexin.common.cache.RedisKeyConst;
import com.gexin.common.utils.StringUtil;

public class GeXinSessionKit {


	public static String setSession(String data) {
		String sessionId = StringUtil.generID();
		CacheUtils.set(RedisKeyConst.weixinuser_key + sessionId, data, RedisKeyConst.day);
		return sessionId;
	}

	public static void delSession(String session_id) {
		CacheUtils.del(RedisKeyConst.weixinuser_key + session_id);
	}

	public static String getSession(String session_id) {
		return CacheUtils.get(RedisKeyConst.weixinuser_key + session_id);
	}
}
